﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace FtpCrawler
{
    /// <summary>
    /// FTP站点配置信息
    /// </summary>
    public class FtpConfig
    {
        private string _site;   // ftp站点
        private int _port = 21;
        private string _path = "";    // 起始目录，以/开始，后面以/结束
        private string _username = "anonymous";    // 用户名
        private string _password = "anonymous@163.com";    // 密码
        private string _encoding = "gb2312";    // 服务器编码

        public FtpConfig(string site)
        {
            this._site = site;
        }

        public FtpConfig(string site, int port, string path, string username, string password, string encoding)
        {
            this.Site = site;
            this.Port = port;
            this.Path = path;
            this.Username = username;
            this.Password = password;
            this._encoding = encoding;
        }

        public string Site
        {
            get { return _site; }
            set { _site = value; }
        }

        public int Port
        {
            get { return _port; }
            set { _port = value; }
        }

        public string Path
        {
            get { return _path; }
            set { _path = value; }
        }

        public string Username
        {
            get { return _username; }
            set { _username = value; }
        }

        public string Password
        {
            get { return _password; }
            set { _password = value; }
        }

        public string Encoding
        {
            get { return _encoding; }
            set { _encoding = value; }
        }
    }
}
